package com.ws.universal.tools.permission;


import android.content.Context;
import android.content.Intent;

import androidx.fragment.app.Fragment;

/**
 * Created by Administrator on 2017/10/10 0010.
 */

public final class AppFragmentTarget implements Target {
    private Fragment mFragment;

    public AppFragmentTarget(Fragment fragment) {
        this.mFragment = fragment;
    }


    @Override
    public Context getContext() {
        return mFragment.getActivity();
    }

    @Override
    public void startActivity(Intent intent) {
        mFragment.startActivity(intent);
    }

    @Override
    public void startActivityForResult(Intent intent, int requestCode) {
        mFragment.startActivityForResult(intent, requestCode);
    }
}
